package pyx.crazycards.game.managers;

import java.util.List;

import pyx.crazycards.game.managers.annotation.DataObject;
import pyx.crazycards.game.managers.annotation.Propertie;
import pyx.crazycards.game.managers.persistence.Persistable;

@DataObject(name = "gameclient", base = "crazy.cards.game")
public class GameClient extends Persistable {
	
	@Propertie(name = "block")
	Block block;
	
	@Propertie(name = "ip")
	String ip;
	
	@Propertie(name = "user")
	User user;
	
	@Propertie(name = "points")
	Long points;
	
	@Propertie(name = "resources")
	ValueProperties resources;
	
	@Propertie(name = "status")
	ValueProperties status;
	
	@Propertie(name = "life")
	Long life;
	
	@Propertie(name = "cards", dataObjectCollection = true)
	List<Card> cards;
	
	@Propertie(name = "hand", dataObjectCollection = true)
	List<Card> cardsOnHand;
	
	public String getIp() {
		return ip;
	}
	
	public void setIp(String ip) {
		this.ip = ip;
	}
	
	public User getUser() {
		return user;
	}
	
	public void setUser(User user) {
		this.user = user;
	}
	
	public Long getPoints() {
		return points;
	}
	
	public void setPoints(Long points) {
		this.points = points;
	}
	
	public Long getLife() {
		return life;
	}
	
	public void setLife(Long life) {
		this.life = life;
	}
	
	public void addLife(Integer value) {
		this.life += value;
	}
	
	public Block getBlock() {
		return block;
	}
	
	public void setBlock(Block block) {
		this.block = block;
	}
	
	public List<Card> getCards() {
		return cards;
	}
	
	public void setCards(List<Card> cards) {
		this.cards = cards;
	}
	
	public List<Card> getCardsOnHand() {
		return cardsOnHand;
	}
	
	public void setCardsOnHand(List<Card> cardsOnHand) {
		this.cardsOnHand = cardsOnHand;
	}
	
	public ValueProperties getResources() {
		return resources;
	}
	
	public void setResources(ValueProperties resources) {
		this.resources = resources;
	}
	
	public ValueProperties getStatus() {
		return status;
	}
	
	public void setStatus(ValueProperties status) {
		this.status = status;
	}
	
}
